#ifndef SL_SOUND_H
#define SL_SOUND_H

#include <AL/al.h>

#ifdef JMBC_INSIDE

typedef struct
{
	unsigned int rate;
	unsigned int channels;
	unsigned int frames;
	short *samples;
} SLSound;

SLSound *
slSoundStore(unsigned int id);

#endif

// Context

void
slSoundCreateContext(void);

// Generation / Deletion

void
slGenSounds(unsigned int n, unsigned int *sounds);

void
slDeleteSounds(unsigned int n, unsigned int *sounds);

// Load / Unload

#include "slVORBIS.h"

void
slSoundUnload(unsigned int id);

void
slSoundsUnload(unsigned int n, unsigned int *sounds);

// Query

ALenum
slSoundChannelsToFormat(unsigned int channels);

void
slSoundBufferData(unsigned int id, ALuint buffer);

#endif
